package com.zhifei.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhifei.system.domain.DataSourceEntity;
import com.zhifei.system.domain.XrxsCallbackEntity;
import com.zhifei.system.domain.XrxsPositionEntity;
import com.zhifei.system.mapper.XrxsCallbackMapper;
import com.zhifei.system.mapper.XrxsPositionMapper;
import com.zhifei.system.service.XrxsCallbackService;
import com.zhifei.system.service.XrxsPositionService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class XrxsPositionServiceImpl extends ServiceImpl<XrxsPositionMapper, XrxsPositionEntity> implements XrxsPositionService {


    @Override
    public XrxsPositionEntity getByPositionId(String positionId) {
        XrxsPositionEntity entity = null;
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("position_id",positionId);
        List<XrxsPositionEntity> list = baseMapper.selectList(wrapper);
        if(list!=null && list.size()>0){
            entity = list.get(0);
        }
        return entity;
    }
}
